package chan.project.smartlawservice.dataManage;

import chan.project.smartlawmodel.entity.Instrument;
import chan.project.smartlawmodel.entity.LawRegulation;
import chan.project.smartlawservice.config.FeignInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "dataManage",
        configuration = FeignInterceptor.class,
        path = "/api/data")
public interface DataManageFeignClient {

    @GetMapping("/inner/getLaw")
    List<String> getAllLawFileName();

    @GetMapping("/inner/getLastLaw")
    LawRegulation getLastLaw(@RequestParam("title") String title);

    //根据用户的输入查询相关案件
    @GetMapping("/inner/get/legal")
    List<Instrument> getLegalCase(@RequestParam("keywords") List<String> keywords);
}
